﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using FluentScheduler;
using System.Web.Hosting;

/// <summary>
/// AutoAtten 的摘要说明
/// </summary>
public class AutoAtten : IJob, IRegisteredObject
{
    private readonly object _lock = new object();
    SQ_Eval ss = new SQ_Eval();
    private bool _shuttingDown;
    public AutoAtten()
    {
        HostingEnvironment.RegisterObject(this);
    }
    public void Execute()
    {
        lock (_lock)
        {
            if (_shuttingDown)
                return;
            // ss.StartAttendance("0");
            //ss.StartEval("0");

        }
    }

    public void Stop(bool immediate)
    {
        lock (_lock)
        {
            _shuttingDown = true;
        }

        HostingEnvironment.UnregisterObject(this);
    }
}